#include "Ray.h"

void Ray_t::Init( SD_Tools::Vector& start, SD_Tools::Vector& end )
{
	m_Delta.x = end.x - start.x;
	m_Delta.y = end.y - start.y;
	m_Delta.z = end.z - start.z;
	m_Delta.w = 0.0f;

	m_IsSwept = (((m_Delta.x*m_Delta.x)+(m_Delta.y*m_Delta.y)+(m_Delta.z*m_Delta.z)) != 0.0f);
	m_Extents.x = m_Extents.y = m_Extents.z = m_Extents.w = 0.0f;

	m_IsRay = true;

	m_StartOffset.x = m_StartOffset.y = m_StartOffset.z = m_StartOffset.w = 0.0f;
	m_Start.x = start.x;
	m_Start.y = start.y;
	m_Start.z = start.z;
	m_Start.w = 0.0f;
}